read `MotzkinClever.txt`: print(`Here are examples with restrictions on peak heights and valley heights`): print(``): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n`): eq:=fABr({},{},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2r+1}`): eq:=fABr({2*r+1},{},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No valley height can belong to {2r+1}`): eq:=fABr({},{2*r+1},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {3r+1}`): eq:=fABr({3*r+1},{},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2r+1} and no valley can belong to {2r+1}`): eq:=fABr({2*r+1},{2*r+1},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2*r+1,3*r+1}`): eq:=fABr({2*r+1,3*r+1},{},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2*r+1} and no valley height can belong to {3*r+1}`): eq:=fABr({2*r+1},{3*r+1},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2*r+1} and no valley height can belong to {3*r+2}`): eq:=fABr({2*r+1},{3*r+2},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2*r+1} and no valley height can belong to {4*r+1}`): eq:=fABr({2*r+1},{4*r+1},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: print(``): print(``): print(`----------------------------`): print(``): print(``): print(`Let a(n) be the number of Motzkin paths of length n with the following restrictions`): print(`No peak height can belong to {2*r+1,4*r+2}`): eq:=fABr({2*r+1,4*r+2},{},r,x,P): if eq=FAIL then print(eq): print(`cannot find equation`): else print(`The generating function P(x) of the sequence a(n) satisfies the algebraic equation`): print(eq=0): fi: